import { createApp } from 'vue'
import './style.css'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router'
import { createPinia } from 'pinia'

//import { usePersist } from 'pinia-use-persist'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

// 如果您正在使用CDN引入，请删除下面一行。
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }

app.use(ElementPlus)
app.use(router)

const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
//pinia.use(usePersist)
app.use(pinia)
app.mount('#app')

//createApp(App).mount('#app')